package com.lizhenhua.usersave.controller;


import com.lizhenhua.fmmall.entity.Users;

import com.lizhenhua.usersave.service.UserSaveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
@CrossOrigin
public class UserSaveController {
    @Autowired
    private UserSaveService userSaveService;

    @PostMapping("/save")
    // 如果参数是一个对象 那么我们应该在实体类中添加注解
    public int save(@RequestBody Users users) {

        return userSaveService.saveUser(users);

    }


}
